package com.driver.core;

import com.driver.core.convert.IConvert;
import com.driver.core.convert.MySqlService;
import com.driver.core.convert.SqlServerService;

import java.sql.*;
import java.util.ArrayList;
import java.util.List;

public class TableManager {


    public static List<Table> getTable() throws SQLException {
        String url = DBManager.getConfig().getUrl();
            if (url.contains("mysql")) {
                return MySqlService.getInstance().getTable();
            } else if (url.contains("sqlserver")) {
                return SqlServerService.getInstance().getTable();
            }

        throw new RuntimeException("未知的驱动");
    }


}
